﻿/* ==============================================================================
 * 功能描述：NpcAttribute  
 * 
 * 创 建 者：郑镇泉
 * 
 * 创建日期：2016/4/27 20:26:49
 * ==============================================================================*/
using UnityEngine;
using System.Collections;
using ZZQFrameWork;

public class NpcAttribute : MonoBehaviour
{
    [HideInInspector]
    public PlayerAI PlayerAI;

    private CharacterModule characterModule
    {
        get { return ModuleManager.Instance.Get<CharacterModule>(); }
    }
    private BackpackModule backpackModule
    {
        get { return ModuleManager.Instance.Get<BackpackModule>(); }
    }

    /// <summary>
    /// 根据属性类型获取角色该属性的属性数据
    /// </summary>
    /// <param name="type"></param>
    /// <returns></returns>
    public AttrData GetAttrDataByAttrType(Enum_AttrType type)
    {
        return characterModule.mainRole.GetAttrDataByAttrType(type);
    }

    /// <summary>
    /// 获取攻击力
    /// </summary>
    /// <returns></returns>
    public int GetAttack()
    {
        return characterModule.mainRole.GetAttack();
    }
}